package bishi2016;

import java.util.*;

public class Wangyi_SchoolarShip {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int classes = 0;
		int fullScore = 0, avg = 0;
		Score[] eachClass;
		int score = 0, oneScoreTime = 0;
		long totalScores = 0, curScores = 0, spentTime = 0;
		while (scanner.hasNext()) {
			spentTime = 0;  //每次都需要清空
			curScores = 0;
			classes = scanner.nextInt();
			fullScore = scanner.nextInt();
			avg = scanner.nextInt();
			eachClass = new Score[classes];
			totalScores = avg * classes; // 计算总共需要的分数
			for (int i = 0; i < classes; i++) {
				score = scanner.nextInt();
				oneScoreTime = scanner.nextInt();
				curScores += score;
				eachClass[i] = new Score(score, oneScoreTime);
			}
			if (curScores >= totalScores) {
				System.out.println(0);
//				return;       //在线编程的时候不能这样写啊，这样直接接返回了
				continue;
			}
			Arrays.sort(eachClass, new Comparator<Score>() {
				@Override
				public int compare(Score s1, Score s2) {
					if (s1.oneScoreTime < s2.oneScoreTime) {
						return -1;
					} else if (s1.oneScoreTime > s2.oneScoreTime) {
						return 1;
					} else {
						return 0;
					}
				}
			});
			outer:
			for (int i = 0; i < eachClass.length ; i++) {
//				System.out.println("eachClass: " + eachClass[i]);
				//注意，这里之所以是小于不是等于是因为假如初始为9， 第一次满足，进入循环，
				//若是等于，10 == 10 ，继续进入循环
				while(eachClass[i].usualScore < fullScore){
					spentTime += eachClass[i].oneScoreTime;
					eachClass[i].usualScore++;
					curScores++;
//					System.out.println("time : " + spentTime + "curS" + curScores);
					if (curScores >= totalScores) {
						break outer;
					}
				}
			}
			System.out.println(spentTime);
		}
		scanner.close();
	}

	public static class Score {
		public int usualScore;
		public int oneScoreTime;

		public Score(int score, int oneScoreTime) {
			this.usualScore = score;
			this.oneScoreTime = oneScoreTime;
		}
		@Override
		public String toString() {
			return "usualScore: " + usualScore + "  onetime:  " + oneScoreTime ;
		}
	}
}
